<template>
  <div class="container">
    <div class="info-container">
      <div class="info1">朵云家居专营店</div>
      <div class="info2">
        <label>张文强</label>
        <span>金牌客户经理</span>
      </div>
      <div class="info3">优惠价格、生产加急、发货、快递、发票等问题</div>
    </div>
    <div class="code-container">
      <div class="code1">快加我好友吧~</div>
      <div class="code2"><img :src="qrcode" /></div>
      <div class="code3">
        <img src="../../assets/1.png" />
        <p>长按识别二维码</p>
      </div>
    </div>
  </div>
</template>

<script>
import api from '../../api/index';
export default {
  data() {
    return {
      qrcode: null,
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      api.getQrCode().then((res) => {
        const { data } = res.data;
        this.qrcode = data;
      });
    },
  },
};
</script>

<style scoped lang="scss">
.container {
  height: 100%;
  .info-container {
    background: #2d2d2d;
    color: #fff;
    padding: 6rem 1rem 1rem;
    .info1 {
      font-size: 1.2rem;
    }
    .info2 {
      margin-top: 1rem;
      font-size: 1.8rem;
      font-weight: bold;
      > span {
        display: inline-block;
        margin-left: 1rem;
        padding-left: 1rem;
        font-size: 1.2rem;
        line-height: 1.2rem;
        border-left: 2px solid #fff;
      }
    }
    .info3 {
      margin-top: 1rem;
      font-size: 0.9rem;
    }
  }
  .code-container {
    padding: 0.2rem;
    text-align: center;
    .code1 {
      padding: 1rem;
      color: #555;
    }
    .code2 {
      margin: 0 auto;
      width: 14rem;
      height: 14rem;
      > img {
        width: 100%;
        height: 100%;
      }
    }
    .code3 {
      padding: 1rem;
      > img {
        width: 4rem;
        height: 4rem;
      }
      > p {
        font-size: 0.8rem;
        color: #999;
      }
    }
  }
}
</style>
